Prefetching is one technique that may be used to speed up the loading of webpages. By prefetching and caching content such as webpages or dependent resources (e.g., audio, video, image, and JavaScript files), the content can be quickly served out of a browser cache on a user device, thereby reducing overall network delay and loading time. Different browsers have provided different mechanisms for a web application to suggest resources to prefetch. In order for a web application to use these mechanisms, the web application designer typically takes the approach of predicting webpage transitions. However, predicting webpage transitions is increasing challenging, because the page URLs (uniform resource locators) themselves may be changing across users or requests. Furthermore, making wrong webpage transition predictions can be wasteful for a user's bandwidth. Therefore, improved techniques for prefetching content are desirable.